package br.unisal.domain;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

public class CPFTeste {

	private CPF cpf;
	

	@Test
	public void validaCPFdeveRetornarFalseQuandoForNull() {
		cpf = new CPF(null);
		assertEquals(false, cpf.validaCPF());
	}
	
	@Test
	public void validaCPFdeveRetornarFalseQuandoTamanhoMenorQue6() {
		cpf = new CPF("12345");
		assertEquals(false, cpf.validaCPF());
	}
	
	@Test
	public void validaCPFdeveRetornarFalseQuandoNaoForNumerico() {
		cpf = new CPF("12345A");
		assertEquals(false, cpf.validaCPF());
	}

	@Test
	public void validaCPFdeveRetornarTrueQuandoForNumericoEMaiorQue5() {
		cpf = new CPF("123456");
		assertEquals(true, cpf.validaCPF());
	}
	
	@Test
	public void validaGetNumeroCPF(){
		cpf = new CPF("123456");
		assertEquals("123456", cpf.getNumero());
	}
}
